import { tileTree } from '@/utils';
import {
    HomeOutline,
    LockClosedOutline,
    PeopleOutline,
    LockOpenOutline,
    ListCircleSharp
} from '@vicons/ionicons5';

export const menu = [
    {
        path: '/home-page',
        name: 'homePage',
        component: () => import('@/views/Home/index.vue'),
        meta: {
            title: '首页',
            icon: HomeOutline
        }
    },
    {
        path: '/manage-enum',
        name: 'manageEnum',
        component: () => import('@/views/ManageEnum/index.vue'),
        meta: {
            title: '数据字典',
            icon: ListCircleSharp
        }
    },
    {
        path: '/manage-permiss',
        name: 'managePermiss',
        meta: {
            title: '权限管理',
            icon: LockClosedOutline
        },
        children: [
            {
                path: '/person',
                name: 'managePerson',
                component: () => import('@/views/ManagePerson/index.vue'),
                meta: {
                    title: '人员管理',
                    icon: PeopleOutline
                }
            },
            {
                path: '/role',
                name: 'manageRole',
                component: () => import('@/views/ManageRole/index.vue'),
                meta: {
                    title: '角色管理',
                    icon: LockOpenOutline
                }
            }
        ]
    }
];

// 平铺路由
export const tileMenu = tileTree(menu, { id: 'path' });
